<script lang="ts" setup>
import { useTestStore, useCounterStore } from "@/stores";
import { storeToRefs } from "pinia";
const Test = useTestStore();
const Count = useCounterStore();
const { count, name } = storeToRefs(Count);
// console.log(count, name);
console.log("Test", Test);
Count.name = "小鱼干";
const change = () => {
  Count.count++;
  Test.name += "-";
  Test.change("11");
};
const resetTest = () => {
  Test.$reset();
  Count.reset();
};
const box = () => {
  return h("div", {}, "鱼钓猫");
};

</script>

<template>
  <h1>TEST：{{ Test.name }} -- {{ Test.double }}</h1>
  <hr />
  <h1>Count: {{ Count.count }}</h1>
  <hr />
  <el-button type="primary" @click="change">点击</el-button>
  <el-button type="primary" @click="resetTest">重置 TEST</el-button>
</template>

<style lang="scss" scoped></style>
